﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.WriteLine("G'Day! I'm a WebServer, Dude!!!");

            //WebServer WS = new WebServer("http://localhost/", "c:\\");
            //WS.Start();

            //Console.WriteLine("WebServer started and listening .... (any key to stop)");

            //while (true)
            //{
            //    Console.ReadKey();
            //    break;
            //}

            //WS.Stop();

            //Console.WriteLine("WebServer stopped.");
            //Console.ReadKey();





            Console.WriteLine("G'Day! I'm a WebServer, Dude!!!");

            HttpRequestHandler WS = new HttpRequestHandler();
            string[] aryPrefixes = new string[] { "http://localhost/" };
            //ArrayList aryPrefixes = new ArrayList();
            //aryPrefixes.Add("http://localhost/");
            WS.ListenAsynchronously(aryPrefixes);

            Console.WriteLine("WebServer started and listening .... (any key to stop)");

            while (true)
            {
                Console.ReadKey();
                break;
            }

            WS.StopListening();

            Console.WriteLine("WebServer stopped. Press any key to exit.");
            Console.ReadKey();
        }
    }
}


